#include <gtk/gtk.h>
#include "gtkCallBacks.h"
#include "gtkGlobals.h"
#include <ctime>
#include <string>
#include <iostream>
using namespace std;



int main(int argc, char* argv[])
{

    gtk_init(&argc, &argv);
    // config CallBacks
    init();
    g_signal_connect(GTK_BUTTON(btnLess), "clicked", G_CALLBACK(timeChange), (void*)0);
    g_signal_connect(GTK_BUTTON(btnMore), "clicked", G_CALLBACK(timeChange), (void*)1);
    g_signal_connect(GTK_BUTTON(btnStart), "clicked", G_CALLBACK(startCounting), nullptr);
    g_signal_connect(GTK_BUTTON(btnReset), "clicked", G_CALLBACK(resetCounting), nullptr);
    g_signal_connect(GTK_BUTTON(btnSwitch), "clicked", G_CALLBACK(changeStatus), nullptr);g_signal_connect(G_OBJECT(topWindow), "delete_event", G_CALLBACK(DeleteEvent), NULL);
    guint timer = g_timeout_add(1000, (GSourceFunc)countDown, nullptr);
    gtk_widget_show_all(topWindow);
    gtk_main();
    return 0;
}